package com.example.utils;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class LocalDB extends SQLiteOpenHelper {

	private static final int DATABASE_VERSION = 2;
	public static final String CELL_NO = "cell_No";
	public static final String TABLE_NAME = "message_log";
	public static final String MESSAGE = "message";
	public static final String TIMESTAMP = "timestamp";
	private static final String DICTIONARY_TABLE_CREATE = "CREATE TABLE "
			+ TABLE_NAME + " (" + CELL_NO + " TEXT, " + MESSAGE + " TEXT, "
			+ TIMESTAMP + " TEXT);";
	private static final String DATABASE_NAME = "clientMessage";

	public LocalDB(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(DICTIONARY_TABLE_CREATE);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
	}
}
